﻿using System.Threading;
using System.Threading.Tasks;
using RabbitMQ.Client.Events;
using Keede.RabbitMQ.EasyClient;
using System;

namespace Keede.Rabbitmq.HandleService.QuickStart.handler
{
    public class OrderCreated2Handler : BaseMsgListener<OrderCreated2>
    {
        public OrderCreated2Handler()
        {
            this.ServerName = "Test2";
        }

        public override async Task<bool> MessageReceivedHandler(string message, BasicDeliverEventArgs args)
        {
            return await Task.Run(() =>
            {
                Console.WriteLine($"OrderCreated2 Message: {message}");
                return false;
            });
        }
    }

    public class OrderCreated2 : BaseMsg
    {
        public string Id { get; set; }
    }
}